<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<form:input path="id" type="hidden" />

<div class="form-group">
	<div class="col-lg-offset-2 col-lg-10 alert alert-danger"
		id="painelErro">
		<span><strong>Erro:</strong><span id="camposObrigatorios"></span>
		</span>
	</div>
</div>
<div class="form-group">

	<div class="panel-group" id="accordion">
		<div class="panel panel-default">
			<div class="panel-heading accordion-toggle" data-toggle="collapse"
				data-parent="#accordion" href="#collapseOne">
				<h4 class="panel-title">
					<a class="accordion-toggle" data-toggle="collapse"
						data-parent="#accordion" href="#collapseOne"> Dados gerais </a>
				</h4>
			</div>
			<br />
			<div id="collapseOne" class="panel-collapse collapse in">
				<div class="form-group">
					<label for="inputNome" class="col-lg-2 control-label">Nome</label>
					<div class="col-lg-4">
						<form:input type="text" class="form-control" id="inputNome"
							placeholder="Digite o nome" path="nome" />
					</div>
				</div>
				<div class="form-group">
					<label for="inputDataNascimento" class="col-lg-2 control-label">Data
						nascimento</label>
					<div class="col-lg-2">
						<form:input type="text" id="inputDataNascimento"
							path="dataNascimento" class="form-control"
							placeholder="Digite a data de nascimento"></form:input>
					</div>
				</div>
				<div class="form-group">
					<label for="inputDataObito" class="col-lg-2 control-label">Data
						óbito</label>
					<div class="col-lg-2">
						<form:input type="text" id="inputDataObito" path="dataObito"
							class="form-control" placeholder="Digite a data de óbito"></form:input>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">Sexo</label>
					<div class="col-lg-6">
						<form:radiobutton id="radioSexo" value="M"
							checked="checked" path="sexo" label="Masculino" />&nbsp;
						<form:radiobutton id="radioSexo" value="F" path="sexo" label="Feminino"/>
					</div>
				</div>
				<div class="form-group">
					<label for="inputNomePai" class="col-lg-2 control-label">Filiação
						Pai</label>
					<div class="col-lg-4">
						<form:input type="text" id="inputNomePai" path="filiacaoPai"
							class="form-control" placeholder="Digite o nome do pai"></form:input>
					</div>
				</div>
				<div class="form-group">
					<label for="cpfPai" class="col-lg-2 control-label">CPF
						Pai</label>
					<div class="col-lg-2">
						<form:input id="cpfPai" type="text" path="cpfPai"
							class="form-control" placeholder="Digite o CPF do pai"></form:input>
					</div>
				</div>
				<div class="form-group">
					<label for="inputNomeMae" class="col-lg-2 control-label">Filiação
						Mãe</label>
					<div class="col-lg-4">
						<form:input id="inputNomeMae" type="text" path="filiacaoMae"
							class="form-control" placeholder="Digite o nome da Mãe"></form:input>
					</div>
				</div>
				<div class="form-group">
					<label for=cpfMae class="col-lg-2 control-label">CPF
						Mãe</label>
					<div class="col-lg-2">
						<form:input id="cpfMae" type="text" path="cpfMae"
							class="form-control" placeholder="Digite o CPF da mãe"></form:input>
					</div>
				</div>
			</div>
		</div>
		<div class="panel-group" id="accordion">
			<div class="panel panel-default">
				<div class="panel-heading accordion-toggle" data-toggle="collapse"
					data-parent="#accordion" href="#collapseTwo">
					<h4 class="panel-title">
						<a class="accordion-toggle" data-toggle="collapse"
							data-parent="#accordion" href="#collapseTwo"> Documentos</a>
					</h4>
				</div>
				<br />
				<div id="collapseTwo" class="panel-collapse collapse">
					<div class="panel-body">
						<div class="form-group">
							<label for="inputCpf" class="col-lg-2 control-label">CPF</label>
							<div class="col-lg-3">
								<form:input id="inputCpf" type="text" path="documentacao.cpf"
									class="form-control" placeholder="Digite o CPF"></form:input>
							</div>
						</div>

						<div class="form-group">
							<label for="inputIdentidade" class="col-lg-2 control-label">RG</label>
							<div class="col-lg-3">
								<form:input id="inputIdentidade" type="text"
									path="documentacao.identidade.numero" class="form-control"
									placeholder="Digite o RG"></form:input>
							</div>
						</div>
						<div class="form-group">
							<label for="inputCtps" class="col-lg-2 control-label">CTPS</label>
							<div class="col-lg-3">
								<form:input type="text" id="inputCtps" path="documentacao.CTPS"
									class="form-control" placeholder="Digite a CTPS"></form:input>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPis" class="col-lg-2 control-label">PIS</label>
							<div class="col-lg-3">
								<form:input type="text" id="inputPis" path="documentacao.PIS"
									class="form-control" placeholder="Digite o PIS"></form:input>
							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
		<div class="panel-group" id="accordion">
			<div class="panel panel-default">
				<div class="panel-heading accordion-toggle" data-toggle="collapse"
					data-parent="#accordion" href="#collapseThree">
					<h4 class="panel-title">
						<a class="accordion-toggle" data-toggle="collapse"
							data-parent="#accordion" href="#collapseThree"> Complementar</a>
					</h4>
				</div>
				<br />
				<div id="collapseThree" class="panel-collapse collapse">
					<div class="panel-body">
						<div class="form-group">
							<label for="inputRacaCor" class="col-lg-2 control-label">Raça/Cor</label>
							<div class="col-lg-3">
								<form:select id="inputRacaCor" path="racaCor"
									class="form-control">
									<option>Selecione</option>
									<c:forEach var="racaCor" items="${racaCor}">
										<option value="${racaCor}"
											<c:if test="${racaCor.descricao eq pessoa.racaCor.descricao}" > selected="selected" </c:if>>${racaCor.descricao}</option>
									</c:forEach>
								</form:select>
							</div>
						</div>

						<div class="form-group">
							<label for="inputPossuiDeficiencia" class="col-lg-2 control-label">Possui
								deficiência</label>
							<div class="col-lg-3">
								<form:checkbox id="inputPossuiDeficiencia" path="ehDeficiente" />
							</div>
						</div>
					</div>

					<div class="form-group">
						<label for="tipoDeficiencia" class="col-lg-2 control-label">Tipo
							deficiência</label>
						<div class="col-lg-3">
							<form:select id="tipoDeficiencia" path="tipoDeficiencia"
								class="form-control">
								<option>Selecione</option>
								<c:forEach var="tipoDeficiencia" items="${tipoDeficiencia}">
									<option value="${tipoDeficiencia}"
										<c:if test="${tipoDeficiencia.descricao eq pessoa.tipoDeficiencia.descricao}" > selected="selected" </c:if>>
										${tipoDeficiencia.descricao}</option>
								</c:forEach>
							</form:select>
						</div>
					</div>
				</div>
				<div class="panel-group" id="accordion">
					<div class="panel panel-default">
						<div class="panel-heading accordion-toggle" data-toggle="collapse"
							data-parent="#accordion" href="#collapseFour">
							<h4 class="panel-title">
								<a class="accordion-toggle" data-toggle="collapse"
									data-parent="#accordion" href="#collapseFour"> Endereço</a>
							</h4>
						</div>
						<br />
						<div id="collapseFour" class="panel-collapse collapse">
							<div class="panel-body">

								<div class="form-group">
									<label for="inputPais" class="col-lg-2 control-label">País</label>
									<div class="col-lg-3">
										<form:select id="inputPais" path="endereco.paisTransiente"
											class="form-control">
											<option>Selecione</option>
											<c:forEach var="pais" items="${paises}">
												<option value="${pais}"
													<c:if test="${pais eq pessoa.endereco.pais.nomePais}" > selected="selected" </c:if>>
													${pais}</option>
											</c:forEach>
										</form:select>
									</div>
								</div>

								<div class="form-group">
									<label for="inputEstado" class="col-lg-2 control-label">UF</label>
									<div class="col-lg-3">
										<form:select id="inputEstado" path="endereco.estadoTransiente"
											class="form-control">
											<option value="${null}">Selecione</option>
											<c:forEach var="estado" items="${estados}">
												<option value="${estado.siglaEstado}"
													<c:if test="${estado.siglaEstado eq pessoa.endereco.estado.siglaEstado}" > selected="selected" </c:if>>
													${estado.siglaEstado}</option>
											</c:forEach>
										</form:select>
									</div>
								</div>
								<div class="form-group">
									<label for="inputCidade" class="col-lg-2 control-label">Cidade</label>
									<div class="col-lg-3">
										<form:select id="inputCidade" path="endereco.cidadeTransiente"
											class="form-control">
											<option value="${null}">Selecione</option>
											<c:forEach var="cidade" items="${cidades}">
												<option value="${cidade.nomeCidade}"
													<c:if test="${cidade.nomeCidade eq pessoa.endereco.cidade.nomeCidade}" > selected="selected" </c:if>>
													${cidade.nomeCidade}</option>
											</c:forEach>
										</form:select>
									</div>
								</div>
								<div class="form-group">
									<label for="inputBairro" class="col-lg-2 control-label">Bairro</label>
									<div class="col-lg-3">
										<form:input id="inputBairro" type="text"
											path="endereco.bairro" class="form-control"></form:input>
									</div>
								</div>
								<div class="form-group">
									<label for="inputLogradouro" class="col-lg-2 control-label">Logradouro</label>
									<div class="col-lg-3">
										<form:input id="inputLogradouro" type="text"
											path="endereco.logradouro" class="form-control"></form:input>
									</div>
								</div>
								<div class="form-group">
									<label for="inputCep" class="col-lg-2 control-label">CEP</label>
									<div class="col-lg-3">
										<form:input id="inputCep" type="text" path="endereco.cep"
											class="form-control"></form:input>
										<br>
									</div>
								</div>
								<div class="form-group">
									<label for="inputComplemento" class="col-lg-2 control-label">Complemento</label>
									<div class="col-lg-3">
										<form:textarea id="inputComplemento"
											path="endereco.complemento" class="form-control"></form:textarea>
										<br>
									</div>
								</div>
								<div class="form-group">
									<label for="inputTelefone" class="col-lg-2 control-label">Telefone</label>
									<div class="col-lg-3">
										<form:input type="text" id="inputTelefone"
											path="endereco.telefone" class="form-control"></form:input>
										<br>
									</div>
								</div>
								<div class="form-group">
									<label for="inputEmail" class="col-lg-2 control-label">Email</label>
									<div class="col-lg-3">
										<form:input type="text" id="inputEmail" path="endereco.email"
											class="form-control"></form:input>
										<br>
									</div>
								</div>
								<div class="form-group">
									<label for="inputCelular" class="col-lg-2 control-label">Celular</label>
									<div class="col-lg-3">
										<form:input type="text" id="inputCelular"
											path="endereco.celular" class="form-control"></form:input>
										<br>
									</div>
								</div>

							</div>
						</div>
					</div>
					<div class="panel-group" id="accordion">
						<div class="panel panel-default">
							<div class="panel-heading accordion-toggle"
								data-toggle="collapse" data-parent="#accordion"
								href="#collapseFive">
								<h4 class="panel-title">
									<a class="accordion-toggle" data-toggle="collapse"
										data-parent="#accordion" href="#collapseFive"> Formação</a>
								</h4>
							</div>
							<br />
							<div id="collapseFive" class="panel-collapse collapse">
								<div class="panel-body">

									<div class="form-group">
										<label for="inputGrauEscolaridade" class="col-lg-2 control-label">Grau
											Escolaridade</label>
										<div class="col-lg-3">
											<form:select id="inputGrauEscolaridade"
												path="grauEscolaridade" class="form-control">
												<option>Selecione</option>
												<c:forEach var="grauEscolaridade"
													items="${grauEscolaridade}">
													<option value="${grauEscolaridade}"
														<c:if test="${grauEscolaridade.descricao eq pessoa.grauEscolaridade.descricao}" > selected="selected" </c:if>>
														${grauEscolaridade.descricao}</option>
												</c:forEach>
											</form:select>
										</div>
									</div>

									<div class="form-group">
										<label for="inputInstituicaoEnsino" class="col-lg-2 control-label">Instituição
											de Ensino</label>
										<div class="col-lg-3">
											<form:input id="inputInstituicaoEnsino" type="text"
												path="instituicaoEnsino" class="form-control"></form:input>
											<br>
										</div>
									</div>
									<div class="form-group">
										<label for="inputCurso" class="col-lg-2 control-label">Curso
											de Ensino</label>
										<div class="col-lg-3">
											<form:input id="inputCurso" type="text" path="curso"
												class="form-control"></form:input>
											<br>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="form-group">
	<div class="col-lg-offset-5 col-lg-10">
		<a href="#" class="btn btn-success" id="btn-salvar">Salvar</a> <a
			href="#" id="btn-cancelar" class="btn btn-danger">Cancelar</a>
	</div>
</div>